package com.example.multidatasource.db2.entity;

import java.io.Serializable;
import java.util.Arrays;

/**
 * @author 
 */
public class Lesson implements Serializable {
    private String createdBy;

    private String mainCread;

    private String conent;

    private byte[] id;

    private static final long serialVersionUID = 1L;

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public String getMainCread() {
        return mainCread;
    }

    public void setMainCread(String mainCread) {
        this.mainCread = mainCread;
    }

    public String getConent() {
        return conent;
    }

    public void setConent(String conent) {
        this.conent = conent;
    }

    public byte[] getId() {
        return id;
    }

    public void setId(byte[] id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Lesson other = (Lesson) that;
        return (this.getCreatedBy() == null ? other.getCreatedBy() == null : this.getCreatedBy().equals(other.getCreatedBy()))
            && (this.getMainCread() == null ? other.getMainCread() == null : this.getMainCread().equals(other.getMainCread()))
            && (this.getConent() == null ? other.getConent() == null : this.getConent().equals(other.getConent()))
            && (Arrays.equals(this.getId(), other.getId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
        result = prime * result + ((getMainCread() == null) ? 0 : getMainCread().hashCode());
        result = prime * result + ((getConent() == null) ? 0 : getConent().hashCode());
        result = prime * result + (Arrays.hashCode(getId()));
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", createdBy=").append(createdBy);
        sb.append(", mainCread=").append(mainCread);
        sb.append(", conent=").append(conent);
        sb.append(", id=").append(id);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}